Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Final optimizations for reagent holder #804

Merged
merged 3 commits into from
Nov 24, 2023
Merged

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Skyrat: Skyrat-SS13/Skyrat-tg#25216
Original PR: tgstation/tgstation#79862

About The Pull Request

Yup this is the last time I'll lay hands on holder.dm after 2 rounds of code compression the file was still over 2000 lines long so now the next best thing to reduce it is organizing procs into logical files, that and even more proc removals. As you can see we are still able to reduce code size even further

1. Removes & merges expose_multiple() proc into expose()
Th only difference between these 2 procs is that expose() uses all reagents inside the holder whereas expose_multiple() uses a select few reagents. We can just add a 4th parameter to expose() that will accept a list of reagents thus achieving the same results and that was done reducing overall code

2. Removes conditonal_update() proc & on_update() proc
The proc on_update() definition is empty and no reagent was overriding it and as a result conditonal_update() that calls this proc is also functionally useless therefore both of these procs were removed reducing overall code

3. Finally splits holder.dm into logical files under the folder code/modules/reagents/holder

  • holder.dm: this is the still the file for core functionality it's just now moved into this new folder. Added comments to group procs under separate categories for easy readability.
  • mob_life.dm: contains reagent code for metabolizing reagents and for handling stasis
  • reactions.dm: all code for reagents reacting inside the holder
  • properties.dm: procs for editing/reading the volume, temperature, ph, purity properties of reagents inside the holder, also for reading its taste description
  • ui_data.dm: all code for displaying & interacting with reagent data via UI

Changelog

🆑 SyncIt21
code: removes & merges expose_multiple() proc into expose() proc inside reagent holder
code: removes conditonal_update() proc & on_update() proc inside reagent holder and reagent
refactor: Reagent code has been trimmed and split into multiple files. report bugs on github
/:cl:

* Final optimizations for reagent holder

* Modular

---------

Co-authored-by: SyncIt21 <[email protected]>
Co-authored-by: Giz <[email protected]>
@Steals-The-PRs Steals-The-PRs added Mirroring conflict git cherry-pick во что-то уткнулся. Не ставить вручную, только для бота TG Mirror Code modification Refactoring labels Nov 24, 2023
@Iajret Iajret merged commit 0027024 into master Nov 24, 2023
22 of 23 checks passed
@Iajret Iajret deleted the upstream-mirror-25216 branch November 24, 2023 16:15
AnywayFarus added a commit that referenced this pull request Nov 24, 2023
Iajret pushed a commit that referenced this pull request Feb 7, 2024
* Gives paradox clone their own ghost polling icon (#81229)

## About The Pull Request

Currently all ghost roles, when polling for players, shows a syndicate
poster. This is lame as hell, especially since most of the roles aren't
even Syndicate aligned.
This adds support to have your own icons for it, and adds one for the
Paradox clone since I already had an idea for it.

## Why It's Good For The Game

Paradox clones are not syndicate aligned and it does not make sense to
portray that to players, this looks much better, and hopefully soon
other antags will follow suite.

![image](https://github.com/tgstation/tgstation/assets/53777086/b6016ff1-9914-42a8-bd9f-e72ba5539e11)

## Changelog

:cl:
add: Paradox clones now have a bluespace stream instead of a syndicate
poster as their ghost poll icon.
/:cl:

* Gives paradox clone their own ghost polling icon

---------

Co-authored-by: John Willard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code modification Mirroring conflict git cherry-pick во что-то уткнулся. Не ставить вручную, только для бота Refactoring TG Mirror
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants